package com.workcell.workdata.im.model.vo;


import com.workcell.workdata.im.entity.Group;

import java.util.Date;
import java.util.List;

public class GroupVO {
    private Long id;

    private Long uid;

    private String name;

    private String notice;

    private Byte state;

    private Date createTime;

    private String photo;

    private String summary;

    private List<GroupMemberVO> memberList;

    private List<GroupRobotVO> robotList;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getNotice() {
        return notice;
    }

    public void setNotice(String notice) {
        this.notice = notice;
    }

    public Byte getState() {
        return state;
    }

    public void setState(Byte state) {
        this.state = state;
    }

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public List<GroupMemberVO> getMemberList() {
        return memberList;
    }

    public List<GroupRobotVO> getRobotList() {
        return robotList;
    }

    public void setMemberList(List<GroupMemberVO> memberList) {
        this.memberList = memberList;
    }

    public void setRobotList(List<GroupRobotVO> robotList) {
        this.robotList = robotList;
    }

    public static GroupVO of(Group group){
        if (group == null){
            return null;
        }
        GroupVO vo = new GroupVO();
        vo.uid = group.getUid();
        vo.state = group.getState();
        vo.id = group.getId();
        vo.name = group.getName();
        vo.notice = group.getNotice();
        vo.createTime = group.getCreateTime();
        vo.photo =group.getPhoto();
        vo.summary =group.getSummary();
        return vo;
    }
}
